vulkan: Set initial layout to undefined
authorTestingPlant <49836-TestingPlant@users.noreply.gitlab.gnome.org>
Sun, 8 May 2022 05:08:03 +0000 (05:08 +0000)
committerTestingPlant <49836-TestingPlant@users.noreply.gitlab.gnome.org>
Sun, 8 May 2022 05:39:36 +0000 (05:39 +0000)
Having the initial layout set to VK_IMAGE_LAYOUT_GENERAL causes issues
when going from the final layout to the initial layout since the image
layout is expected to be the general layout. Setting the initial layout
to undefined doesn't have this restriction.

gsk/vulkan/gskvulkanrenderpass.c

index a6b427a63257eb80d29d180e483d2f95937a82ae..34b035245a1fd078462aa0c250fea8dee7cea5ce 100644 (file)
@@ -170,7 +170,7 @@ gsk_vulkan_render_pass_new (GdkVulkanContext  *context,
                                               .samples = VK_SAMPLE_COUNT_1_BIT,
                                               .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
                                               .storeOp = VK_ATTACHMENT_STORE_OP_STORE,
-                                              .initialLayout = VK_IMAGE_LAYOUT_GENERAL,
+                                              .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED,
                                               .finalLayout = final_layout
                                            }
                                         },